package com.icode.gulimall.order.feign;

import com.icode.common.utils.R;
import com.icode.gulimall.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


import java.util.Map;

/**
 * @Author: my_code
 * @Email: my_code@foxmail.com
 * @Create: 2021-01-22 16:51
 */
@FeignClient("gulimall-ware")
public interface WareFeignService {

    @PostMapping("/ware/waresku/checkItemsStock")
    R checkItemsStock (@RequestParam Map<String, Integer> skuInfo);

    @PostMapping("/ware/waresku/lockstock")
    R lockItemsStock(@RequestBody WareSkuLockVo lockVo);

    @PostMapping("/ware/wareinfo/fare")
    R getFare(@RequestParam("addrId") Long addrId);
}
